package com.hns.can.common.domain;

/**
 * 定义字段类型
 * @author anysome
 *
 */
public class Field {
	
	public static final String DATA_TYPE_STRING = "string";
	public static final String DATA_TYPE_BOOLEAN = "boolean";
	public static final String DATA_TYPE_SHORT = "short";
	public static final String DATA_TYPE_INTEGER = "integer";
	public static final String DATA_TYPE_LONG = "long";
	public static final String DATA_TYPE_FLOAT = "float";
	public static final String DATA_TYPE_DOUBLE = "double";
	public static final String DATA_TYPE_BIGDECIMAL = "bigdecimal";
	public static final String DATA_TYPE_DATE = "date";
	public static final String DATA_TYPE_TIMESTAMP = "timestamp";

	/**
	 * 字段名，中文
	 */
	String label;
	/**
	 * 字段key，变量名
	 */
	String name;
	/**
	 * 取值范围:
	 * string ,boolean ,short ,integer ,long ,float ,double ,bigdecimal ,date ,timestamp
	 */
	String dataType;
	
	public Field(String name, String dataType, String label) {
		this.name = name;
		this.dataType = dataType.toLowerCase();
		this.label = label;
	}
	
	public String getLabel() {
		return label;
	}

	public String getDataType() {
		return dataType;
	}

	public String getName() {
		return name;
	}

}
